<script setup>
import config from "@/config";
import { useStore } from "vuex";
const store = useStore();
const url = config.nuxt2 + "/childHome";
const handleDatachange = (e) => {
  let { activeIndex } = e.detail.data;
  console.log(activeIndex, "基座监听子应用datachange");
  localStorage.setItem("activeIndex", activeIndex);
  store.commit("setActiveIndex", activeIndex);
};
</script>

<template>
  <div>
    <micro-app
      keep-alive
      @datachange="handleDatachange"
      name="childHome"
      :url="url"
      ssr
    ></micro-app>
  </div>
</template>

<style></style>